/****************************************************************
 *  This file created by writerB.php on 03/20/2007 at 23:02:49  *
 ****************************************************************
 *  writerB.php created by Tonk (tonk@ctonk.com) in 2007        *
 ****************************************************************
 *                 General Document Information
 *
 *  File Name: note.h
 *  Class Name: Note
 *  Parent Classes: none
 *  Data members: 8
 *  Notes:
 ****************************************************************/

#ifndef __H_NOTE
#define __H_NOTE

#include <iostream>



class Note {
	protected:
		// Protected data...
		int			_NoteID;	// Holds a unique value for every instantiation.
		unsigned	_id;
		unsigned	_pid;
		std::string	_board;
		std::string	_author;
		std::string	_recipient;
		std::string	_subject;
		std::string	_body;
		std::string	_sent;

		// Protected methods...
		void	setNoteID( const int& NoteID );

	public:
		// Constructors...
		Note();
		Note( const Note& );	// Doesn't change _NoteID
		~Note();

		// Operators...
		Note& operator = ( const Note& );		// Doesn't change _NoteID
		bool operator == ( const Note& ) const;	// Doesn't compare _NoteIDs
		bool operator < ( const Note& ) const;	// Compares _NoteIDs
		bool operator > ( const Note& ) const;	// Compares _NoteIDs

		// Public accessor methods...
		int			getNoteID( void ) const;
		void		setId( const unsigned& id );
		unsigned	getId( void ) const;
		void		setPid( const unsigned& pid );
		unsigned	getPid( void ) const;
		void		setBoard( const std::string& board );
		std::string	getBoard( void ) const;
		void		setAuthor( const std::string& author );
		std::string	getAuthor( void ) const;
		void		setRecipient( const std::string& recipient );
		std::string	getRecipient( void ) const;
		void		setSubject( const std::string& subject );
		std::string	getSubject( void ) const;
		void		setBody( const std::string& body );
		std::string	getBody( void ) const;
		std::string* getBodyP( void );
		void		setSent( const std::string& sent );
		std::string	getSent( void ) const;

		// General methods...

		// Static members and methods...
		static int	noteIndex;	// Used to create a unique id for every Note object
		static int	numNotes;	// Keeps track of the total number of Note objects
};

// Associated operators...
std::ostream& operator << ( std::ostream& write, Note& );
std::ostream& operator << ( std::ostream& write, Note* );
std::istream& operator >> ( std::istream& read, Note& );
std::istream& operator >> ( std::istream& read, Note* );



#endif // __H_NOTE
